<?php
$id		        = gpc_getIntPost("id",$id);
$code  			= gpc_getStringGet("code");
$name			= gpc_getStringPost("Name");
$Email          = gpc_getStringPost("Email");
$title			= gpc_getStringPost("Title");
$content		= gpc_getStringPost("Content");


if(substr($title,0,4)=="add:")
{
    $arr        = explode(":",$title);
    $name       = $arr[1];
    $type       = $arr[2];
    $title      = $arr[3];
    $id         = InsertConfigEmail($name,$type,$title,$Email,$content);
    page_transfer("Update Email Success !","id=$id",true);
}
else if($id>0)
{
    UpdateConfigEmail($title,$Email,$content);
}
page_transfer("Update Email Success !","id=$id");
exit();
?>
